package factory.pizzafm;

/**
 * @author jacob
 * @Date 2020/12/20 21:27
 */
public abstract class PizzaStore {

    public Pizza orderPizza(PizzaType type){
        Pizza pizza;

        pizza = createPizza(type);

        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();

        return pizza;
    }

    /**
     * 创建Pizza
     * @param type
     * @return
     */
    abstract Pizza createPizza(PizzaType type);
}
